package uk.co.hs.web.initializer;

import javax.annotation.Resource;

import uk.co.hs.util.version.VersionRetriever;

public class VersionController implements Controllable
{
  @Resource
  private VersionRetriever mVersionRetriever;

  /**
   * @see uk.co.hs.web.initializer.Controllable
   * #order()
   * {@inheritDoc}
   */
  public int order()
  {
    return 0;
  }

  /**
   * @see uk.co.hs.web.initializer.Controllable
   * #start()
   * {@inheritDoc}
   */
  public void start()
  {
     mVersionRetriever.writeVersions();
  }

  /**
   * @see uk.co.hs.web.initializer.Controllable
   * #shutdown()
   * {@inheritDoc}
   */
  public void shutdown()
  { }

  public void setVersionRetriever(VersionRetriever aVersionRetriever)
  {
    mVersionRetriever = aVersionRetriever;
  }

}
